package com.google.code.swingonfire.utility.date;

import java.text.DateFormatSymbols;
import java.util.Calendar;
import java.util.Locale;

public class DateRenderInfoAmPmMarkerPart extends AbstractDateRenderInfoPart
{

    public DateRenderInfoAmPmMarkerPart(int length)
    {
        super(length);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected String getValue(Calendar calendar, DateFormatSymbols dateFormatSymbols, Locale locale)
    {
        return dateFormatSymbols.getAmPmStrings()[calendar.get(Calendar.AM_PM)];
    }

}
